#include <bits/stdc++.h>
#include <ctime>
#include "ThreadPoolOnlyOne.hxx"  


int main()
{
    srand(time(nullptr) ^ getpid());
    const char* p= "+-*/^";
    ThreadPool<Task>* tp = ThreadPool<Task>::GetInstance();


    tp->Start();
    while(1)
    {
        
        int x = rand()%100 +1;
        usleep(4239);
        int y = rand()%100 +1;
        char op = p[rand()%5];

        Task t(to_string(x)+op+to_string(y));
        sleep(1);
        tp->Push(t);
    }
    tp->join();
    return 0;
}